﻿#ifndef SVDETECTCONTROLLER_H
#define SVDETECTCONTROLLER_H

#include <QFileDialog>
#include <QPainter>

#include "SVCalculateModel.h"
#include "SVCamera.h"
#include "SVDetectView.h"
#include "SVTemplateModel.h"

class SVDetectController : public QObject
{
    Q_OBJECT
public:
    SVDetectController(QWidget *widget = nullptr, QObject *parent = nullptr);

    QWidget *getView() const;

    void loadCamera(SVCamera *camera);
    void loadCalculateModel(SVCalculateModel *model);

private slots:
    void onStartDetection();
    void onStopDetection();
    void onCaptureImage(const QImage &image);

private:
    SVDetectView *mDetectView;
    SVCamera *mCamera;
    SVCalculateModel *mCalculateModel;
};

#endif
